Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sidecar-extensibility): detect upgradeable contracts and pull ABIs from IPFS #237

Merged
merged 26 commits into from
Feb 24, 2025

Conversation

serichoi65
Copy link
Contributor

@serichoi65 serichoi65 commented Feb 11, 2025

Description

In order to side-load contracts to Sidecar, we want to add the following features:

  • Detecting an upgradeable contract when we process transaction logs
    • This will not be applicable to EigenLayers' core contracts but only to side-loaded contracts to automatically update contract ABIs
    • This function is not being called in this PR
  • Pulling ABIs from IPFS (main source)
    • The contract metadata needs to exist in IPFS in order for us to pull ABIs. Added 10 seconds timeout during HTTP Get
    • TODO: add a fallback source to pull the data from Etherscan

Non-feature updates:

  • Added AbiFetcher as a new input to ContractManager
  • All tests, except pipelineIntegration_test and restakedStrategies_test, should use a non-paid quiknode url address
  • Updated the ethereum NewClient parameter with http.Client to accept mocked client

Fixes #223

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Chore (non-breaking change which does not add functionality)
  • Docs (documentation updates)

How Has This Been Tested?

Added tests to prove my fix is effective for all new modules by running

./scripts/goTest.sh -timeout 0 ./pkg/contractManager -v -p 1 -run 'Test_ContractManager'

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@serichoi65 serichoi65 requested a review from a team as a code owner February 11, 2025 17:43
@serichoi65 serichoi65 marked this pull request as draft February 11, 2025 17:43
@serichoi65 serichoi65 marked this pull request as ready for review February 13, 2025 18:34
@serichoi65 serichoi65 changed the title detect upgradeable contracts feat(sidecar-extensibility): detect upgradeable contracts Feb 13, 2025
@serichoi65 serichoi65 force-pushed the seri.choi/upgradable-contracts branch 2 times, most recently from c05e33b to d91781e Compare February 13, 2025 19:23
@non-fungible-nelson
Copy link
Collaborator

Hi seri - great PR! Can we have a description please?

@seanmcgary
Copy link
Member

@serichoi65 I'll let you fill in the PR body with implementation specifics.

@non-fungible-nelson I added a link to the related github issue this addresses

@serichoi65 serichoi65 changed the title feat(sidecar-extensibility): detect upgradeable contracts feat(sidecar-extensibility): detect upgradeable contracts and pull ABIs from IPFS Feb 19, 2025
@serichoi65 serichoi65 force-pushed the seri.choi/upgradable-contracts branch from 8c7f61d to dd4f27c Compare February 19, 2025 20:49
@serichoi65 serichoi65 force-pushed the seri.choi/upgradable-contracts branch from 9e681ad to 9fbc15f Compare February 21, 2025 20:42
@serichoi65 serichoi65 force-pushed the seri.choi/upgradable-contracts branch from 87d25cb to eec3e53 Compare February 24, 2025 21:20
@serichoi65 serichoi65 merged commit 96fcdac into master Feb 24, 2025
14 checks passed
@serichoi65 serichoi65 deleted the seri.choi/upgradable-contracts branch February 24, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: dynamically upgrade side-loaded contract implementations
3 participants